﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShoppingCart.Business.Abstract;
using ShoppingCart.DataAccess.Abstract;
using ShoppingCart.DataAccess.Concrete;
using ShoppingCart.Domain.Entities;

namespace ShoppingCart.Business.Concrete
{
    public class ProductService : IProductService
    {
        IProductRepository productRepo;
        public ProductService()
        {
            productRepo = new ProductRepository();
        }

        public IQueryable<Product> Products
        {
            get
            {
                return productRepo.Products;
            }
        }

        public void SaveProduct(Product product)
        {
            productRepo.SaveProduct(product);
        }

        public void DeleteProduct(Product product)
        {
            productRepo.DeleteProduct(product);
        }
    }
}
